from framework import views as view

from . import models, serializers


class CreateUserView(view.CreateUpdateDeleteAPIView):
    queryset = models.User.objects.all()
    serializer_class = serializers.CreateUserSerializer
    permission_classes = ()


class UserModelViewSets(view.ModelViewSets):
    """
    此视图 创建用户不可用
    """

    queryset = models.User.objects.all()
    serializer_class = serializers.UserSerializer


class ListUserView(view.ListAPIView):
    queryset = models.User.objects.all()
    serializer_class = serializers.UserSerializer


    def get(self, request):
        raise Exception('error')